<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
include_once("../../config.inc.php");

$_LangPath = "bettypeparam";	//語言檔參數，務必放在最前面
include_once(__Admin_Path."/logincheck.php");
include_once(__Language_Path."/selectlanguage_admin.php");

$arrPower = CheckUsePower("BetTypeParam");
if($arrPower === false)ErrMsgOutputHTML("Error", "", 1);

$intLType = (int)$_data["LType"];
if($intLType == 0)$intLType = 1;

$strSQL = "select * from `bet_BetType` where LType = ".$intLType." order by ID";
if(!$RS = @PMA_mysql_query($strSQL, $$_Conn)){
	$GLOBALS["errormessage"] = "Show BetType Data Error!!";
	$GLOBALS["errorhidden"] = "\nErr: ".PMA_mysql_error($$_Conn).",\nSQL: ".$strSQL.",\nLine: ".__LINE__.",\nPage: ".__FILE__;
	ErrMsgOutputHTML("Error", "", 1);
}
if(PMA_mysql_num_rows($RS) == 0){
	$GLOBALS["errormessage"] = "No BetType Data!!";
	$GLOBALS["errorhidden"] = "\nSQL: ".$strSQL.",\nLine: ".__LINE__.",\nPage: ".__FILE__;
	ErrMsgOutputHTML("Error", "", 1);
}

?><html>
<head>
<meta content="text/html; charset=utf-8 print $_Charset;?>" http-equiv="content-type">
<link rel="stylesheet" href="/css/backend.css" type="text/css">
<script language="JavaScript" src="/inc/admin_envirset.js"></script>
<style type="text/css">
<!--
.Tip {color: #FF0000; font-size: 15px; background-color: ##99FFFF}
//-->
</style>
<script language="JavaScript">
<!--
function selfSubmit(){
	document.BParamFrm2.LType.value = document.BParamFrm.LType.value;
	document.BParamFrm2.submit();
}
//-->
</script>
</head>
<script language="JavaScript">
<!--
strRowClassName = "clef";
//-->
</script>

<body class="MyBody">
<form action="index.php" method="GET" name="BParamFrm2">
<input type="hidden" name="LType" value="">
</form>
<form action="update.php" method="post" name="BParamFrm">
<h3><?php print $_strBetTypeParam["Title"];?></h3>
<select name="LType" onchange="selfSubmit()"><?php

foreach($_arrLType as $intLT => $strLT){
	$strSd = ($intLT == $intLType)?" selected":"";
	print "<option value='".$intLT."'".$strSd.">".$strLT."</option>\n";
}

?></select>
<table class="MyTable" cellspacing="1" cellpadding="0" style="width: 100%;">
<tr class="Tip"><td class="MyTitleL">&nbsp;</td>
<th class="MyTitleL"><?php print $_strBetTypeParam["StakeJump"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["StakeJumpRate"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["MaxStakeGap"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["A_Commission_MinValue"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["B_Commission_MinValue"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["C_Commission_MinValue"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["D_Commission_MinValue"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["Commission_Jump"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["RefreshSecond"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["MinStake"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["MaxPayOff"];?></td>
<th class="MyTitleL"><?php print $_strBetTypeParam["Com_BetLimit"];?></td>
</tr>
<?php
while($Rows = PMA_mysql_fetch_array($RS, MYSQL_ASSOC)){
	?>
<tr class="clef">
<td class="MyTitleL"><?php print $Rows["Type_Value_".$_intLang];?></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][StakeJump]" value="<?php print $Rows["StakeJump"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][StakeJumpRate]" value="<?php print $Rows["StakeJumpRate"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][MaxStakeGap]" value="<?php print $Rows["MaxStakeGap"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][A_Commission_MinValue]" value="<?php print $Rows["A_Commission_MinValue"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][B_Commission_MinValue]" value="<?php print $Rows["B_Commission_MinValue"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][C_Commission_MinValue]" value="<?php print $Rows["C_Commission_MinValue"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][D_Commission_MinValue]" value="<?php print $Rows["D_Commission_MinValue"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][Commission_Jump]" value="<?php print $Rows["Commission_Jump"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][RefreshSecond]" value="<?php print $Rows["RefreshSecond"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][MinStake]" value="<?php print $Rows["MinStake"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][MaxPayOff]" value="<?php print $Rows["MaxPayOff"];?>"></td>
<td class="MyCell"><input type="text" size="7" name="KBetTypeParam[<?php print $Rows["ID"];?>][Com_BetLimit]" value="<?php print $Rows["Com_BetLimit"];?>"></td>
</tr>
	<?php
}
?>
</table>
<input type=submit>
</form>
</body>
</html>
<?php @mysql_close($$_Conn);?>